package com.ggk911.pharmacy_system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 角色表
 * @author ggk-911
 * @version 1.0 2023/3/8 10:04
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@TableName("role")
public class Role {
    @TableId(value = "role_id", type = IdType.AUTO)
    @ApiModelProperty(value = "角色编号")
    private Integer roleId;

    @ApiModelProperty(value = "角色名称")
    private String roleName;

    //一个角色对应多个用户
    @TableField(exist = false)
    private List<User> userList;
}
